Skip to content

Conversation

@odidev
Copy link
Owner

@odidev odidev commented Nov 13, 2025

No description provided.

This section demonstrates how to benchmark Rust performance using **official Rust benchmarking tools** — `cargo bench` and the **Criterion** library — to measure code execution speed, stability, and performance consistency on Arm64 hardware.

### Verify Rust and Cargo
Ensure that Rust and Cargo are properly installed before running benchmarks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you missed adding steps to verify the installation???

Probably below:

rustc --version
cargo --version

cd rust-benchmark
```
### Add Criterion Benchmarking Dependency
**Criterion** is the officially recommended benchmarking crate for Rust.Add it to your project by editing the `Cargo.toml` file:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Criterion** is the officially recommended benchmarking crate for Rust.Add it to your project by editing the `Cargo.toml` file:
**Criterion** is the officially recommended benchmarking crate for Rust. Add it to your project by editing the `Cargo.toml` file:

```
### Add Criterion Benchmarking Dependency
**Criterion** is the officially recommended benchmarking crate for Rust.Add it to your project by editing the `Cargo.toml` file:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is cargo.toml located?? Mention the location clearly.

Benchmark files in this directory are automatically detected by Cargo.

**Add the Benchmark Code**
Paste the following benchmark code:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spacing to avoid overlapping of lines. Check on Hugo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants